<template>
  <div class="page-container">
    <!--工具栏-->
    <div class="toolbar" style="float:left;padding-top:10px;padding-left:15px;width: 100%;">
      <el-steps :active="active" finish-status="success" simple style="margin-top: 20px">
        <el-step title="1、设置抽奖规则"></el-step>
        <el-step title="2、奖品设置"></el-step>
        <el-step title="3、提交审核"></el-step>
      </el-steps>
      <div v-show="active == 1">
        <form class="form-horizontal mgt15">
          <!--基本信息-->
          <div class="pdL10 border-left font-bold mgB15 ng-binding">
            基本信息
          </div>
          <div class="form-group">
            <!--活动名称-->
            <label class="col-sm-2 control-label ng-binding">活动名称：</label>
            <div class="col-sm-10 pdt3px themeTextColor ng-binding">
              <el-input v-model="presellTime1" placeholder="限制在64个字符以内"></el-input>
            </div>
          </div>
          <div class="line line-dashed b-b line-lg"></div>

          <div class="line line-dashed b-b line-lg"></div>
          <div class="form-group ng-scope">
            <label class="col-sm-2 control-label ng-binding">定金支付时间：</label>
            <div class="col-sm-10 pdt3px themeTextColor ng-binding">
              <el-date-picker
                v-model="sTime"
                type="datetime"
                placeholder="开始时间"
                class="input_postion"></el-date-picker>至
              <el-date-picker
                v-model="eTime"
                type="datetime"
                placeholder="结束时间"
                class="input_postion"></el-date-picker>
            </div>
          </div>

          <div class="line line-dashed b-b line-lg"></div>
          <div class="form-group">
            <label class="col-sm-2 control-label ng-binding">抽奖模板：</label>
            <div class="col-sm-10 pdt3px themeTextColor ng-binding">
              <el-select value="大转盘">
                <el-option value="大转盘" label="大转盘"></el-option>
              </el-select>
            </div>
          </div>

          <div class="line line-dashed b-b line-lg"></div>
          <div class="form-group ng-scope" ng-if="promotionDetailContent.promotionType != 12">
            <!--备注-->
            <label class="col-sm-2 control-label ng-binding">备注：</label>
            <div class="col-sm-10 pdt3px themeTextColor">
              <quill-editor
                v-model="content"
                ref="myQuillEditor"
                style="height: 300px;"
                :options="editorOption"
              ></quill-editor>
            </div>
          </div>
          <div class="line line-dashed b-b line-lg ng-scope"></div>


          <!--活动规则-->
          <div class="line line-dashed b-b line-lg ng-scope"></div>
          <div class="line line-dashed b-b line-lg ng-scope"></div>
          <div class="line line-dashed b-b line-lg ng-scope"></div>
          <div class="pdL10 border-left font-bold mgB15 ng-binding">
            活动规则
          </div>
          <div class="line line-dashed b-b line-lg ng-scope"></div>
          <div class="form-group ng-scope " style="margin-top: 45px;">
            <label class="col-sm-2 control-label ng-binding">抽奖活动类型：</label>
            <div class="col-sm-10 pdt3px themeTextColor ng-binding">
              <el-radio-group v-model="radio1">
                <el-radio :label="1" class="form-radio">无订单抽奖</el-radio>
                <el-radio :label="2" class="form-radio">订单抽奖</el-radio>
              </el-radio-group>
            </div>
          </div>
          <div class="line line-dashed b-b line-lg"></div>
          <div class="form-group">
            <label class="col-sm-2 control-label ng-binding">每次抽奖需消耗：</label>
            <div class="col-sm-10 pdt3px themeTextColor ng-binding">
              <el-input v-model="presellTime2"></el-input>
            </div>
          </div>
          <div class="line line-dashed b-b line-lg"></div>
          <div class="form-group">
            <label class="col-sm-2 control-label ng-binding">免积分抽奖次数：</label>
            <div class="col-sm-10 pdt3px themeTextColor ng-binding">
              <el-input v-model="presellTime3"></el-input>
            </div>
          </div>
          <div class="line line-dashed b-b line-lg"></div>
          <div class="form-group">
            <label class="col-sm-2 control-label ng-binding">用户每日抽奖次数上限：</label>
            <div class="col-sm-10 pdt3px themeTextColor ng-binding">
              <el-input v-model="presellTime4"></el-input>
            </div>
          </div>
          <div class="line line-dashed b-b line-lg"></div>
          <div class="form-group">
            <label class="col-sm-2 control-label ng-binding">用户每日中奖次数上限：</label>
            <div class="col-sm-10 pdt3px themeTextColor ng-binding">
              <el-input v-model="presellTime5"></el-input>
            </div>
          </div>

          <!--参与条件-->
          <div class="line line-dashed b-b line-lg ng-scope"></div>
          <div class="pdL10 border-left font-bold mgB15 ng-binding">
            参与条件
          </div>
          <div class="line line-dashed b-b line-lg ng-scope"></div>
          <div class="form-group ng-scope " style="margin-top: 45px;">
            <label class="col-sm-2 control-label ng-binding">活动渠道：</label>
            <div class="col-sm-10 pdt3px themeTextColor ng-binding">
              <el-radio-group v-model="radio2">
                <el-radio :label="3" class="form-radio">BBC</el-radio>
              </el-radio-group>
            </div>
          </div>

        </form>
      </div>
      <div class="tab-container" v-show="active == 2">
        <!--   1   -->
        <el-card class="box-card">
          <el-row class="searchDialog-input">
            <el-col :span="24">
              <el-form :model="dataForm0" label-width="100px" :size="size">
                <el-form-item label="奖项等级：">
                  <el-select v-model="dataForm0.awardLevel0" placeholder="请选择" style="width: 15%">
                    <el-option label="一等奖" value="一等奖"></el-option>
                    <el-option label="二等级" value="二等级"></el-option>
                    <el-option label="三等奖" value="三等奖"></el-option>
                    <el-option label="四等奖" value="四等奖"></el-option>
                    <el-option label="五等奖" value="五等奖"></el-option>
                    <el-option label="六等奖" value="六等奖"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="奖品类别：">
                  <el-select v-model="dataForm0.awardType0" style="width: 15%" placeholder="请选择">
                    <el-option label="商品" value="商品"></el-option>
                    <el-option label="积分" value="积分"></el-option>
                    <el-option label="优惠券" value="优惠券"></el-option>
                    <el-option label="谢谢参与" value="谢谢参与"></el-option>
                  </el-select>
                </el-form-item>
                <div v-show="dataForm0.awardType0 === '商品'">
                  <el-form-item label="添加商品：">
                    <el-button v-model="dataForm0.addingGoods0" plain @click="productClick" style="width: 15%">添加商品</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm0.awardType0 === '积分'">
                  <el-form-item label="积分：">
                    <el-input v-model="dataForm0.integral0" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm0.awardType0 === '优惠券'">
                  <el-form-item label="优惠券：">
                    <el-button v-model="dataForm0.coupon0" plain @click="couponClick" style="width: 15%">添加优惠券</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm0.awardType0 !== '谢谢参与'">
                  <el-form-item label="奖品名称：">
                    <el-input v-model="dataForm0.prizeName0" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm0.awardType0 !== '谢谢参与'">
                  <el-form-item label="奖品数量：">
                    <el-input v-model="dataForm0.prizeNumber0" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <el-form-item label="中奖率：">
                  <el-input v-model="dataForm0.oddWinning0" style="width: 15%"></el-input>%
                </el-form-item>
              </el-form>
            </el-col>
          </el-row>
        </el-card>
        <!--   2   -->
        <el-card class="box-card">
          <el-row class="searchDialog-input">
            <el-col :span="24">
              <el-form :model="dataForm1" label-width="100px" :size="size">
                <el-form-item label="奖项等级：">
                  <el-select v-model="dataForm1.awardLevel1" placeholder="请选择" style="width: 15%">
                    <el-option label="一等奖" value="一等奖"></el-option>
                    <el-option label="二等级" value="二等级"></el-option>
                    <el-option label="三等奖" value="三等奖"></el-option>
                    <el-option label="四等奖" value="四等奖"></el-option>
                    <el-option label="五等奖" value="五等奖"></el-option>
                    <el-option label="六等奖" value="六等奖"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="奖品类别：">
                  <el-select v-model="dataForm1.awardType1" style="width: 15%" placeholder="请选择">
                    <el-option label="商品" value="商品"></el-option>
                    <el-option label="积分" value="积分"></el-option>
                    <el-option label="优惠券" value="优惠券"></el-option>
                    <el-option label="谢谢参与" value="谢谢参与"></el-option>
                  </el-select>
                </el-form-item>
                <div v-show="dataForm1.awardType1 === '商品'">
                  <el-form-item label="添加商品：">
                    <el-button v-model="dataForm1.addingGoods1" plain @click="productClick" style="width: 15%">添加商品</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm1.awardType1 === '积分'">
                  <el-form-item label="积分：">
                    <el-input v-model="dataForm1.integral" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm1.awardType1 === '优惠券'">
                  <el-form-item label="优惠券：">
                    <el-button v-model="dataForm1.coupon1" plain @click="couponClick" style="width: 15%">添加优惠券</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm1.awardType1 !== '谢谢参与'">
                  <el-form-item label="奖品名称：">
                    <el-input v-model="dataForm1.prizeName1" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm1.awardType1 !== '谢谢参与'">
                  <el-form-item label="奖品数量：">
                    <el-input v-model="dataForm1.prizeNumber1" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <el-form-item label="中奖率：">
                  <el-input v-model="dataForm1.oddWinning1" style="width: 15%"></el-input>%
                </el-form-item>
              </el-form>
            </el-col>
          </el-row>
        </el-card>
        <!--   3   -->
        <el-card class="box-card">
          <el-row class="searchDialog-input">
            <el-col :span="24">
              <el-form :model="dataForm2" label-width="100px" :size="size">
                <el-form-item label="奖项等级：">
                  <el-select v-model="dataForm2.awardLevel2" placeholder="请选择" style="width: 15%">
                    <el-option label="一等奖" value="一等奖"></el-option>
                    <el-option label="二等级" value="二等级"></el-option>
                    <el-option label="三等奖" value="三等奖"></el-option>
                    <el-option label="四等奖" value="四等奖"></el-option>
                    <el-option label="五等奖" value="五等奖"></el-option>
                    <el-option label="六等奖" value="六等奖"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="奖品类别：">
                  <el-select v-model="dataForm2.awardType2" style="width: 15%" placeholder="请选择">
                    <el-option label="商品" value="商品"></el-option>
                    <el-option label="积分" value="积分"></el-option>
                    <el-option label="优惠券" value="优惠券"></el-option>
                    <el-option label="谢谢参与" value="谢谢参与"></el-option>
                  </el-select>
                </el-form-item>
                <div v-show="dataForm2.awardType2 === '商品'">
                  <el-form-item label="添加商品：">
                    <el-button v-model="dataForm2.addingGoods2" plain @click="productClick" style="width: 15%">添加商品</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm2.awardType2 === '积分'">
                  <el-form-item label="积分：">
                    <el-input v-model="dataForm2.integral2" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm2.awardType2 === '优惠券'">
                  <el-form-item label="优惠券：">
                    <el-button v-model="dataForm2.coupon2" plain @click="couponClick" style="width: 15%">添加优惠券</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm2.awardType2 !== '谢谢参与'">
                  <el-form-item label="奖品名称：">
                    <el-input v-model="dataForm2.prizeName2" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm2.awardType2 !== '谢谢参与'">
                  <el-form-item label="奖品数量：">
                    <el-input v-model="dataForm2.prizeNumber2" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <el-form-item label="中奖率：">
                  <el-input v-model="dataForm2.oddWinning2" style="width: 15%"></el-input>%
                </el-form-item>
              </el-form>
            </el-col>
          </el-row>
        </el-card>
        <!--   4   -->
        <el-card class="box-card">
          <el-row class="searchDialog-input">
            <el-col :span="24">
              <el-form :model="dataForm3" label-width="100px" :size="size">
                <el-form-item label="奖项等级：">
                  <el-select v-model="dataForm3.awardLevel3" placeholder="请选择" style="width: 15%">
                    <el-option label="一等奖" value="一等奖"></el-option>
                    <el-option label="二等级" value="二等级"></el-option>
                    <el-option label="三等奖" value="三等奖"></el-option>
                    <el-option label="四等奖" value="四等奖"></el-option>
                    <el-option label="五等奖" value="五等奖"></el-option>
                    <el-option label="六等奖" value="六等奖"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="奖品类别：">
                  <el-select v-model="dataForm3.awardType3" style="width: 15%" placeholder="请选择">
                    <el-option label="商品" value="商品"></el-option>
                    <el-option label="积分" value="积分"></el-option>
                    <el-option label="优惠券" value="优惠券"></el-option>
                    <el-option label="谢谢参与" value="谢谢参与"></el-option>
                  </el-select>
                </el-form-item>
                <div v-show="dataForm3.awardType3 === '商品'">
                  <el-form-item label="添加商品：">
                    <el-button v-model="dataForm3.addingGoods3" plain @click="productClick" style="width: 15%">添加商品</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm3.awardType3 === '积分'">
                  <el-form-item label="积分：">
                    <el-input v-model="dataForm3.integral3" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm3.awardType3 === '优惠券'">
                  <el-form-item label="优惠券：">
                    <el-button v-model="dataForm3.coupon3" plain @click="couponClick" style="width: 15%">添加优惠券</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm3.awardType3 !== '谢谢参与'">
                  <el-form-item label="奖品名称：">
                    <el-input v-model="dataForm3.prizeName3" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm3.awardType3 !== '谢谢参与'">
                  <el-form-item label="奖品数量：">
                    <el-input v-model="dataForm3.prizeNumber3" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <el-form-item label="中奖率：">
                  <el-input v-model="dataForm3.oddWinning3" style="width: 15%"></el-input>%
                </el-form-item>
              </el-form>
            </el-col>
          </el-row>
        </el-card>
        <!--   5   -->
        <el-card class="box-card">
          <el-row class="searchDialog-input">
            <el-col :span="24">
              <el-form :model="dataForm4" label-width="100px" :size="size">
                <el-form-item label="奖项等级：">
                  <el-select v-model="dataForm4.awardLevel4" placeholder="请选择" style="width: 15%">
                    <el-option label="一等奖" value="一等奖"></el-option>
                    <el-option label="二等级" value="二等级"></el-option>
                    <el-option label="三等奖" value="三等奖"></el-option>
                    <el-option label="四等奖" value="四等奖"></el-option>
                    <el-option label="五等奖" value="五等奖"></el-option>
                    <el-option label="六等奖" value="六等奖"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="奖品类别：">
                  <el-select v-model="dataForm4.awardType4" style="width: 15%" placeholder="请选择">
                    <el-option label="商品" value="商品"></el-option>
                    <el-option label="积分" value="积分"></el-option>
                    <el-option label="优惠券" value="优惠券"></el-option>
                    <el-option label="谢谢参与" value="谢谢参与"></el-option>
                  </el-select>
                </el-form-item>
                <div v-show="dataForm4.awardType4 === '商品'">
                  <el-form-item label="添加商品：">
                    <el-button v-model="dataForm4.addingGoods4" plain @click="productClick" style="width: 15%">添加商品</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm4.awardType4 === '积分'">
                  <el-form-item label="积分：">
                    <el-input v-model="dataForm4.integral4" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm4.awardType4 === '优惠券'">
                  <el-form-item label="优惠券：">
                    <el-button v-model="dataForm4.coupon4" plain @click="couponClick" style="width: 15%">添加优惠券</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm4.awardType4 !== '谢谢参与'">
                  <el-form-item label="奖品名称：">
                    <el-input v-model="dataForm4.prizeName4" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm4.awardType4 !== '谢谢参与'">
                  <el-form-item label="奖品数量：">
                    <el-input v-model="dataForm4.prizeNumber4" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <el-form-item label="中奖率：">
                  <el-input v-model="dataForm4.oddWinning4" style="width: 15%"></el-input>%
                </el-form-item>
              </el-form>
            </el-col>
          </el-row>
        </el-card>
        <!--   6   -->
        <el-card class="box-card">
          <el-row class="searchDialog-input">
            <el-col :span="24">
              <el-form :model="dataForm5" label-width="100px" :size="size">
                <el-form-item label="奖项等级：">
                  <el-select v-model="dataForm5.awardLevel5" placeholder="请选择" style="width: 15%">
                    <el-option label="一等奖" value="一等奖"></el-option>
                    <el-option label="二等级" value="二等级"></el-option>
                    <el-option label="三等奖" value="三等奖"></el-option>
                    <el-option label="四等奖" value="四等奖"></el-option>
                    <el-option label="五等奖" value="五等奖"></el-option>
                    <el-option label="六等奖" value="六等奖"></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="奖品类别：">
                  <el-select v-model="dataForm5.awardType5" style="width: 15%" placeholder="请选择">
                    <el-option label="商品" value="商品"></el-option>
                    <el-option label="积分" value="积分"></el-option>
                    <el-option label="优惠券" value="优惠券"></el-option>
                    <el-option label="谢谢参与" value="谢谢参与"></el-option>
                  </el-select>
                </el-form-item>
                <div v-show="dataForm5.awardType5 === '商品'">
                  <el-form-item label="添加商品：">
                    <el-button v-model="dataForm5.addingGoods5" plain @click="productClick" style="width: 15%">添加商品</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm5.awardType5 === '积分'">
                  <el-form-item label="积分：">
                    <el-input v-model="dataForm5.integral5" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm5.awardType5 === '优惠券'">
                  <el-form-item label="优惠券：">
                    <el-button v-model="dataForm5.coupon5" plain @click="couponClick" style="width: 15%">添加优惠券</el-button>
                  </el-form-item>
                </div>
                <div v-show="dataForm5.awardType5 !== '谢谢参与'">
                  <el-form-item label="奖品名称：">
                    <el-input v-model="dataForm5.prizeName5" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <div v-show="dataForm5.awardType5 !== '谢谢参与'">
                  <el-form-item label="奖品数量：">
                    <el-input v-model="dataForm5.prizeNumber5" style="width: 15%"></el-input>
                  </el-form-item>
                </div>
                <el-form-item label="中奖率：">
                  <el-input v-model="dataForm5.oddWinning5" style="width: 15%"></el-input>%
                </el-form-item>
              </el-form>
            </el-col>
          </el-row>
        </el-card>
        <!--   7   -->
        <el-card class="box-card">
          <el-row>
            <el-col :span="7">
              <el-form :model="dataForm5" label-width="100px" :size="size">
                <el-form-item label="未中奖说明：">
                  <el-input
                    style="width: 100%"
                    type="textarea"
                    placeholder="请输入原因"
                    v-model="textarea"
                    maxlength="150"
                    show-word-limit>
                  </el-input>
                </el-form-item>
              </el-form>
            </el-col>
          </el-row>
        </el-card>
      </div>
      <div class="tab-container" v-show="active == 3">
        <div style="font-size:25px;text-align: center;margin-top: 27px;">
          <el-alert
            title="等待审核,审核通过后立即生效"
            type="success"
            center
          ></el-alert>
        </div>
      </div>
    </div>
    <div>
      <el-button type="primary" style="margin-top: 60px;margin-bottom: 60px;" v-if="active == 2" @click="upStep">上一步</el-button>
      <el-button type="primary" style="margin-top: 60px;margin-bottom: 60px;" @click="next">下一步</el-button>
    </div>

    <!--商品弹窗-->
    <el-dialog :title="'添加商品'" :inline="true" width="65%" :visible.sync="productVisible111" :close-on-click-modal="false">
      <div class="toolbar" style="float:left;padding-top:10px;padding-left:15px;">
        <el-form :inline="true" :size="size" label-width="100px">
           <el-row class="search-input">
              <el-form-item label="商品名称：">
            <el-input v-model="dataForm6"></el-input>
          </el-form-item>
          <el-form-item label="商品编码：">
            <el-input v-model="dataForm6"></el-input>
          </el-form-item>
          <el-form-item label="商品条码：">
            <el-input v-model="dataForm6"></el-input>
          </el-form-item>
          <el-form-item label="商品类目：">
            <el-input v-model="dataForm6"></el-input>
          </el-form-item>
          <el-form-item label="商品品牌：">
            <el-input v-model="dataForm6"></el-input>
          </el-form-item>
          <el-form-item label="商家名称：">
            <el-input v-model="dataForm6"></el-input>
          </el-form-item>
          <el-form-item label="店铺名称：">
            <el-input v-model="dataForm6"></el-input>
          </el-form-item>
           </el-row>
          <!-- 按钮 -->
          <el-row class="t_r mb20">
             <el-form-item>
            <kt-button icon="fa fa-search" :label="$t('action.search')" type="primary"/>
          </el-form-item>
          <el-form-item>
            <kt-button icon="fa fa-refresh" :label="$t('action.reset')" type="primary" />
          </el-form-item>
          </el-row>
        </el-form>
      </div>
      <div style="padding-top: 45px;">
        <el-table :data="tableData1" border>
          <el-table-column prop="tableData12" label="商品编码"></el-table-column>
          <el-table-column prop="tableData13" label="商品名称"></el-table-column>
          <el-table-column prop="tableData14" label="商品条码"></el-table-column>
          <el-table-column prop="tableData15" label="计量单位"></el-table-column>
          <el-table-column prop="tableData16" label="商品品牌"></el-table-column>
          <el-table-column prop="tableData17" label="商品类目"></el-table-column>
          <el-table-column prop="tableData18" label="所属商家名称"></el-table-column>
          <el-table-column prop="tableData19" label="店铺名称"></el-table-column>
          <el-table-column prop="tableData11" label="原件(元)"></el-table-column>
          <el-table-column fixed="right" label="操作">
            <template slot-scope="scope">
              <el-button type="text" size="small">选择</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <div slot="footer" class="dialog-footer" style="text-align:center">
        <el-button :size="size" @click.native="productVisible111 = false">取消</el-button>
        <el-button :size="size" type="primary" @click.native="productVisible111 = false">确定</el-button>
      </div>
    </el-dialog>

    <!--优惠券弹窗-->
    <el-dialog :title="'添加优惠券'" :inline="true" width="50%" :visible.sync="productVisible222" :close-on-click-modal="false">
      <el-form label-width="120px" :size="size">
        <el-form-item label="券活动名称：">
          <el-input v-model="dataForm6" style="width: 30%"></el-input>
          <kt-button icon="fa fa-search" :label="$t('action.search')" type="primary"/>
        </el-form-item>
      </el-form>
      <el-table :data="tableData2" style="width:100%">
        <el-table-column fixed prop="tableData21" label="优惠券活动ID"></el-table-column>
        <el-table-column fixed prop="tableData22" label="优惠券名称"></el-table-column>
        <el-table-column fixed="right" label="操作">
          <template slot-scope="scope">
            <el-button type="text" size="small">选择</el-button>
          </template>
        </el-table-column>
      </el-table>
      <div slot="footer" class="dialog-footer" style="text-align:center">
        <el-button :size="size" @click.native="productVisible222 = false">取消</el-button>
        <el-button :size="size" type="primary" @click.native="productVisible222 = false">确定</el-button>
      </div>
    </el-dialog>

  </div>
</template>

<script>
  import KtButton from "@/views/Core/KtButton";
  import { format } from "@/utils/datetime";
  import TableColumnFilterDialog from "@/views/Core/TableColumnFilterDialog";
  import { darkmagenta } from "color-name";
  import { quillEditor } from "vue-quill-editor";
  import "quill/dist/quill.core.css";
  import "quill/dist/quill.snow.css";
  import "quill/dist/quill.bubble.css";
  const channelArr = ["bbc"];
  const channelArr1 = ["APP端", "PC端", "微信"];
  const channelArr2 = ["新用户", "老用户"];
  const channelArr3 = ["普通会员"];
  const channelArr4 = ["注册用户", "VIP会员", "金卡"];
  export default {
    name: "Tab",
    components: {
      KtButton,
      TableColumnFilterDialog,
      quillEditor
    },
    data() {
      return {
        productVisible111: false, // 商品
        productVisible222: false, // 优惠券
        textarea: "",
        dataForm0: {
          awardLevel0: "",
          awardType0: '谢谢参与',
          addingGoods0: "",
          integral0: "",
          coupon0: "",
          prizeName0: "",
          prizeNumber0: "",
          oddWinning0: "",
        },
        dataForm1: {
          awardLevel1: "",
          awardType1: "谢谢参与",
          addingGoods1: "",
          integral1: "",
          coupon1: "",
          prizeName1: "",
          prizeNumber1: "",
          oddWinning1: "",
        },
        dataForm2: {
          awardLevel2: "",
          awardType2: "谢谢参与",
          addingGoods2: "",
          integral2: "",
          coupon2: "",
          prizeName2: "",
          prizeNumber2: "",
          oddWinning2: "",
        },
        dataForm3: {
          awardLevel3: "",
          awardType3: "谢谢参与",
          addingGoods3: "",
          integral3: "",
          coupon3: "",
          prizeName3: "",
          prizeNumber3: "",
          oddWinning3: "",
        },
        dataForm4: {
          awardLevel4: "",
          awardType4: "谢谢参与",
          addingGoods4: "",
          integral4: "",
          coupon4: "",
          prizeName4: "",
          prizeNumber4: "",
          oddWinning4: "",
        },
        dataForm5: {
          awardLevel5: "",
          awardType5: "谢谢参与",
          addingGoods5: "",
          integral5: "",
          coupon5: "",
          prizeName5: "",
          prizeNumber5: "",
          oddWinning5: "",
        },
        dataForm6: "",
        sTime: "",
        eTime: "",
        presellTime1: null,
        presellTime2: null,
        presellTime3: null,
        presellTime4: null,
        presellTime5: null,
        addCouponSetShow: true,
        inputDisabled: true,
        couponSetData: [{index: 1}],
        editDialogVisible: false,
        editDialogVisible2: false,
        url: "./static/shop.png",
        url2: "./static/shop2.png",
        content: null,
        editorOption: {},
        size: "small",
        productVisible: false,
        uploadVisible: false,
        operation: false, // true:商品导入, false:下载模板
        activeName: 0,
        setUp: false,
        search: false,
        filters: {},
        editLoading: false,
        modalShow: 1,
        multipleSelection: [],
        repelSelection: [],
        addSelection: [],
        businessList: [{id: "001", name: "张小二服饰", type: "自营商家"}],
        shopList: [{id: "161616", name: "张小二bbc店铺", type: "直营"}],
        tableData: [
          {
            id: 1912250010887324,
            productName: "新供应商001",
            unit: "件",
            shopName: "张小二服饰",
            price: 1.2,
            markdown: 1,
            shopLimit1: 100,
            shopLimit2: 100,
            shopLimit3: 100
          }
        ],
        tableData1: [{
          tableData12: '6923644266066',
          tableData13: '伊利牛奶',
          tableData14: '6923644266021211',
          tableData15: '升',
          tableData16: '伊利',
          tableData17: '奶制品',
          tableData18: '伊利牛奶店',
          tableData19: '伊利牛奶店',
          tableData11: '3.5'
        },{
          tableData12: '6923644266067',
          tableData13: '旺仔牛奶',
          tableData14: '6923644266021243',
          tableData15: '升',
          tableData16: '旺仔',
          tableData17: '奶制品',
          tableData18: '旺仔牛奶店',
          tableData19: '旺仔牛奶店',
          tableData11: '3.5'
        }],
        tableData2: [{
          tableData21: '1912100008227959',
          tableData22: '测试10',
        }, {
          tableData21: '1912300004169677',
          tableData22: '抽奖券',
        }, {
          tableData21: '1912300004269116',
          tableData22: '大转盘',
        }, {
          tableData21: '1912310000104286',
          tableData22: '测试券',
        }],
        active: 1,
        radio1: 1,
        isChange: 0,
        radio2: 3,
        radio3: 3,
        radio4: 3,
        radio5: 3,
        filters: [],
        shopList: [],
        businessList: [],
        checkAll: false,
        checkAll1: false,
        checkAll2: false,
        checkAll3: false,
        checkAll4: false,
        checkedCities: ["bbc"],
        checkedCities1: ["APP端", "PC端", "微信"],
        checkedCities2: ["新用户", "老用户"],
        checkedCities3: ["普通会员"],
        checkedCities4: ["注册用户", "VIP会员", "金卡"],
        cities: channelArr,
        cities1: channelArr1,
        cities2: channelArr2,
        cities3: channelArr3,
        cities4: channelArr4,
        isIndeterminate: true,
        isIndeterminate1: true,
        isIndeterminate2: true,
        isIndeterminate3: true,
        isIndeterminate4: true
      };
    },
    methods: {
      couponClick() {
        this.productVisible222 = true;
      },
      productClick() {
        this.productVisible111 = true;
      },

      changeRadio: function(data) {
        if (data == 0) {
          this.addCouponSetShow = true;
          this.inputDisabled = true;
        } else {
          this.addCouponSetShow = false;
          this.inputDisabled = false;
        }
      },
      removeCouponSet: function(index, row) {
        let this_ = this;
        var temp = [];
        $.each(this_.couponSetData, function(key, val) {
          if (key == index) {
          } else {
            temp.push(val);
          }
        });

        this_.couponSetData = temp;
      },
      addCouponSet: function(data) {
        let this_ = this;
        let index = this_.couponSetData.length + 1;
        let obj = { index };
        this_.couponSetData.push(obj);
      },
      handleCheckAllChange(val) {
        this.checkedCities = val ? channelArr : [];
        this.isIndeterminate = false;
      },
      handleCheckedCitiesChange(value) {
        let checkedCount = value.length;
        this.checkAll = checkedCount === this.cities.length;
        this.isIndeterminate =
          checkedCount > 0 && checkedCount < this.cities.length;
      },
      handleCheckAllChange1(val) {
        this.checkedCities1 = val ? channelArr1 : [];
        this.isIndeterminate1 = false;
      },
      handleCheckedCitiesChange1(value) {
        let checkedCount = value.length;
        this.checkAll1 = checkedCount === this.cities1.length;
        this.isIndeterminate1 =
          checkedCount > 0 && checkedCount < this.cities1.length;
      },
      handleCheckAllChange2(val) {
        this.checkedCities2 = val ? channelArr2 : [];
        this.isIndeterminate2 = false;
      },
      handleCheckedCitiesChange2(value) {
        let checkedCount = value.length;
        this.checkAll2 = checkedCount === this.cities2.length;
        this.isIndeterminate2 =
          checkedCount > 0 && checkedCount < this.cities2.length;
      },
      handleCheckAllChange3(val) {
        this.checkedCities3 = val ? channelArr3 : [];
        this.isIndeterminate3 = false;
      },
      handleCheckedCitiesChange3(value) {
        let checkedCount = value.length;
        this.checkAll3 = checkedCount === this.cities3.length;
        this.isIndeterminate3 =
          checkedCount > 0 && checkedCount < this.cities3.length;
      },
      handleCheckAllChange4(val) {
        this.checkedCities4 = val ? channelArr4 : [];
        this.isIndeterminate4 = false;
      },
      handleCheckedCitiesChange4(value) {
        let checkedCount = value.length;
        this.checkAll4 = checkedCount === this.cities4.length;
        this.isIndeterminate4 =
          checkedCount > 0 && checkedCount < this.cities4.length;
      },
      querySupplierListForAdd() {
        this.editDialogVisible = true;
      },
      querySupplierListForAdd2() {
        this.editDialogVisible2 = true;
      },
      delAllSelectedSupplier() {},
      next() {
        if (this.active === 1) {
          if (this.presellTime5 === null) {
            this.$message({ message: "不允许有空值", type: "warning" });
            return;
          }
        }
        if (this.active == 3) {
          this.$message({ message: "操作成功,请等待审核", type: "success" });
          return;
        }
        if (this.active++ > 3) this.active = 1;
      },
      upStep() {
        if (this.active === 2) {this.active = 1;}
      },
      handleSelectionChange(val) {
        this.multipleSelection = val;
      },
      repelSelectionChange(val) {
        this.repelSelection = val;
      },
      addSelectionChange(val) {
        this.addSelection = val;
      },
      createPage() {
        this.$router.push("/CreatePromotion");
      },
      handleClick(tab, event) {
        console.log(tab, event);
        if (tab.name == "0") {
          // 触发‘配置管理’事件
          this.first();
        } else {
          // 触发‘用户管理’事件
          this.second();
        }
      },
      first() {
        console.log("生效商品");
        this.modalShow = 1;
      },
      second() {
        console.log("互斥商品");
        this.modalShow = 2;
      },
      //添加商品弹窗
      productSelectionModal() {
        this.productVisible = true;
      },
      showBatchSetUp() {
        if (this.search == true) {
          this.search = false;
        }
        if (this.setUp == false) {
          this.setUp = true;
        } else if (this.setUp == true) {
          this.setUp = false;
        }
      },
      showQueryCondition() {
        if (this.setUp == true) {
          this.setUp = false;
        }
        if (this.search == false) {
          this.search = true;
        } else if (this.search == true) {
          this.search = false;
        }
      },
      batchReAdd() {
        if (this.multipleSelection.length < 1) {
          this.$message({ message: "请选择要设置的商品", type: "error" });
          return false;
        }
        this.$message({ message: "操作成功", type: "success" });
      },
      updatePriceAndLimit() {},
      importCommodityModal(val) {
        if (val === 1) {
          this.operation = true;
        } else if (val == 2) {
          this.operation = false;
        }
        this.uploadVisible = true;
      }
    },
    created() {
      this.presellTime1 = this.$route.params.data.title;
      this.sTime = this.$route.params.data.startTime;
      this.eTime = this.$route.params.data.endTime;
    }
  };
</script>

<style scoped>
  .pdL10 {
    padding-left: 10px !important;
  }
  .mgB15 {
    margin-bottom: 15px !important;
  }
  .border-left {
    border-left: 3px #ddd solid !important;
  }
  .font-bold {
    font-weight: 700;
  }
  .form-group {
    margin-bottom: 15px !important;
    margin-right: -0px !important;
    margin-left: -0px !important;
  }
  .form-horizontal .control-label {
    padding-top: 5px;
    margin-bottom: 0;
    text-align: right;
  }
  .form-horizontal div {
    font-family: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif,
    "Regular", "Microsoft YaHei";
    font-size: 12px;
    color: #666666;
    background-color: transparent;
    -webkit-font-smoothing: antialiased;
    line-height: 1.42857143;
    word-wrap: break-word;
  }
  .form-horizontal .control-label {
    padding-top: 3px !important;
  }
  .col-sm-2 {
    width: 16.66666667%;
  }
  /* .col-sm-10 {
      width: 83.33333333%;
  } */
  .col-sm-1,
  .col-sm-2,
  .col-sm-3,
  .col-sm-4,
  .col-sm-5,
  .col-sm-6,
  .col-sm-7,
  .col-sm-8,
  .col-sm-9,
  .col-sm-10,
  .col-sm-11,
  .col-sm-12 {
    float: left;
  }
  .col-xs-1,
  .col-sm-1,
  .col-md-1,
  .col-lg-1,
  .col-xs-2,
  .col-sm-2,
  .col-md-2,
  .col-lg-2,
  .col-xs-3,
  .col-sm-3,
  .col-md-3,
  .col-lg-3,
  .col-xs-4,
  .col-sm-4,
  .col-md-4,
  .col-lg-4,
  .col-xs-5,
  .col-sm-5,
  .col-md-5,
  .col-lg-5,
  .col-xs-6,
  .col-sm-6,
  .col-md-6,
  .col-lg-6,
  .col-xs-7,
  .col-sm-7,
  .col-md-7,
  .col-lg-7,
  .col-xs-8,
  .col-sm-8,
  .col-md-8,
  .col-lg-8,
  .col-xs-9,
  .col-sm-9,
  .col-md-9,
  .col-lg-9,
  .col-xs-10,
  .col-sm-10,
  .col-md-10,
  .col-lg-10,
  .col-xs-11,
  .col-sm-11,
  .col-md-11,
  .col-lg-11,
  .col-xs-12,
  .col-sm-12,
  .col-md-12,
  .col-lg-12 {
    position: relative;
    min-height: 1px;
    padding-right: 15px;
    padding-left: 15px;
  }
  label {
    font-weight: normal;
  }
  label {
    display: inline-block;
    max-width: 100%;
    margin-bottom: 5px;
    font-weight: bold;
  }
  .form-group .pdt3px {
    padding-top: 3px;
  }
  .b-b {
    border-bottom: 1px solid #dddddd;
  }
  .line-dashed {
    border-style: dashed !important;
    background-color: transparent;
    border-width: 0;
  }
  .line-lg {
    margin-top: 15px;
    margin-bottom: 15px;
  }
  .line {
    width: 100%;
    height: 2px;
    margin: 10px 0;
    font-size: 0;
    overflow: hidden;
  }
  table {
    background-color: transparent;
  }
  table {
    border-spacing: 0;
    border-collapse: collapse;
  }
  .i-checks {
    padding-left: 0;
    margin-right: 15px;
    cursor: pointer;
    color: #666666;
  }
  .radio-inline,
  .checkbox-inline {
    display: inline-block;
    padding-left: 20px;
    margin-bottom: 0;
    font-weight: normal;
    vertical-align: middle;
    cursor: pointer;
  }
  .panel-body tr {
    padding: 0 15px;
  }
  .mgt15 {
    margin-top: 15px;
  }
</style>
